#ifndef __BSP_H__
#define __BSP_H__

#include "main.h"

/**
 * @brief control led output
 * 
 * @param state 1:light up, 0:turn off
 * @return int 
 */
extern int bsp_led(uint8_t state);

/**
 * @brief control analog switch 
 * 
 * @param sw_num 1 or 2
 * @param sw_state 0:disable output, 1:enable output
 * @return int 
 */
extern int bsp_asw(uint8_t sw_num, uint8_t sw_state);

/**
 * @brief set max5400 ouput
 * 
 * @param dev_num device number
 * @param value n/256 tap
 * @return int 
 */
extern int bsp_max5400(uint8_t dev_num, uint8_t value);

extern void USER_UART_IRQHandler(UART_HandleTypeDef *huart);
extern void USER_UART_IDLECallback(UART_HandleTypeDef *huart);

#endif //__BSP_H__
